<extend name="Layout/application"/>

<block name="content">
    <div class="row">
        <div class="col-md-12">

            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h1>内容管理</h1>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">文章列表</div>

                        <div class="panel-body">
                            <table class="table table-hover">
                                <thead>
                                <tr>
                                    <th><input type="checkbox" class="fchx"></th>
                                    <th></th>
                                    <th>标题</th>
                                    <th>所属栏目</th>
                                    <th>发布日期</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <form action="" method="post" id="form">
                                    <volist name="article" id="a">
                                        <tr>
                                            <th><input type="checkbox" class="cchx" name="checked_id[]" value="{{$a.id}}"></th>
                                            <td class="id">{{$a.id}}</td>
                                            <td class="id">{{$a.title}}</td>
                                            <td class="id">aa</td>
                                            <td class="id">{{$a.time}}</td>
                                            <td>
                                                <a href="" data-toggle="modal" data-target="#editModal"
                                                   class="edit"><span
                                                        class="glyphicon glyphicon-pencil"></span></a>

                                                <a href="{{:U('destory',array('id'=>$a['id']))}}"> <span
                                                        class="glyphicon glyphicon-trash"></span></a>

                                            </td>
                                        </tr>
                                    </volist>
                                </form>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>


                <div class="col-md-2">
                    <div class="list-group">
                        <a href="{{:U('create')}}" class="list-group-item list-group-item-info sort_category">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 新增 (add)
                        </a>

                        <a href="javascript: void 0;" class="list-group-item list-group-item-info sort_category">
                            <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> 排序 (sort)
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>


</block>
<block name="js">
    <script>
        $(function () {
            $('.fchx').click(function () {
                    $('.cchx').prop('checked', this.checked);
            });
        })
    </script>
</block>